package io.renren.modules.app.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;

import io.renren.common.utils.Query;
import io.renren.common.utils.R;
import io.renren.modules.app.service.ApproveService;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.Map;


/**
 * ${comments}
 *
 * @author lmzhu
 * @email zhulimingchina@gmail.com
 * @date 2020-08-18 10:53:17
 */
@RestController
@RequestMapping("app/approve")
public class ApproveController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ApproveService approveService;

    @GetMapping("/taskList")
    @ApiOperation("获取任务列表")
    public R getTaskList(@RequestParam Map<String, Object> params) throws IOException {

        IPage<Map<String,Object>> tasks = approveService.getTaskListTest(params);
        return  R.ok().put("data",tasks.getRecords());

    }


}
